package com.example.controller;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class JMeterController {

    @PostMapping
    public ResponseDTO jMeterTest(@RequestBody RequestDTO requestDTO) {
        return ResponseDTO.builder().code(1).message(requestDTO.getName() + " , " + requestDTO.getGender()).build();
    }
}

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
class RequestDTO {
    private String name;
    private String gender;
}

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
class ResponseDTO {
    private int code;
    private String message;
}